const path = require('path');
const express = require('express');
const logger = require('morgan');

const port = 8080;
const app = express();

app.use(logger('dev'));

const staticRoot = path.resolve( __dirname , 'public' );
app.use( express.static( staticRoot ) );

app.listen( port , ()=> console.log( `正在监听${port}端口` ) );